<?php


namespace App\Http\Factory;




use App\Http\Controllers\group\GroupController;

class factory
{
//          工厂模式
          const  One='1111';
          const  Two='2222';
          const  Three='3333';

          static public function factorys($type){
              switch ($type){
               case self::One:
                   $obj=new GroupController();
                   break;
                   case self::Two:
                      $obj=new ActiviteController();
                      break;
                  default:
                      return null;

              }
              return  $obj;

          }















}
